package com.cheer.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@ApiModel
public class AwardUpdateParam {

    @NotNull(message = "奖品ID不能为空")
    private Long id;

    @ApiModelProperty("奖品名称")
    private String awardName;

    @ApiModelProperty("库存")
    private Integer stock;

    @ApiModelProperty("图标（暂时用不到）")
    private String icon;

    @ApiModelProperty("是否是积分")
    private Boolean isIntegral;

    @ApiModelProperty("中奖一次给出的数量")
    @Min(value = 1, message = "中奖一次给出的数量不能小于1")
    private Integer unitQuantity;

    @ApiModelProperty("每日最大发放数")
    @Min(value = 0, message = "每日最小发放数0个")
    private Integer dailyMax;

    @ApiModelProperty("开始投放时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startPut;

    @ApiModelProperty("结束投放时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endPut;

    @ApiModelProperty("对应前端页面中奖的index")
    private Integer index;

}
